{extend name="public:layout" /}
{block name="title"}车辆保养{/block}
{block name="head"}
	<style>
		body{font-family: Arial,"Microsoft Yahei";}
	</style>
{/block}
{block name="body"}

<div class="wrap">
    <div class="tabs dz_tabs">
        <a href="#" hidefocus="true" class="active">保养申请</a>
        <a href="#" hidefocus="true">保养列表</a>
    </div>    
    <div class="swiper-container">
        <div class="swiper-wrapper">
	        <div class="swiper-slide">
	           	<div class="content-slide">
	              	<!--司机提交报修审批-->
					<div class="weui-cells weui-cells_form x_weui_cells">
						<div class="weui-cell x_weui_cell">
						    <div class="weui-cell__hd"><label class="weui-label">车牌号：</label></div>
						    <div class="weui-cell__bd">
						      <input class="weui-input" type="tel" placeholder="请输入报修车牌号">
						    </div>
						</div>
						<div class="weui-cell x_weui_cell">
						    <div class="weui-cell__hd"><label class="weui-label">司机姓名：</label></div>
						    <div class="weui-cell__bd">
						      <input class="weui-input" type="tel" placeholder="请输入提交人姓名">
						    </div>
						</div>
						<div class="weui-cell x_weui_cell">
						    <div class="weui-cell__hd"><label class="weui-label">保养原因：</label></div>
						    <div class="weui-cell__bd">
						      	<textarea class="weui-textarea" placeholder="请输入保养原因" rows="3"></textarea>
						    </div>
						</div>
						<div class="weui-cell x_weui_cell">
						    <div class="weui-cell__hd"><label for="" class="weui-label">提交审批时间：</label></div>
						    <div class="weui-cell__bd">
						      <input class="weui-input" type="date" value="">
						    </div>
						</div>
					</div>
					<div style="text-align:center;">
						<input type="submit" value="提交审批" class="tijiao"/>
					</div>
	        	</div>
	    	</div>
	        <div class="swiper-slide mescroll" id="mescroll">
	            <div class="content-slide" id="content-slide"></div>
	        </div>
      	</div>
   </div>
</div>
<!--返回首页-->
<div class="back_index">
	<a href="/system">
		<img class="back_img" src="/public/mobile/static/images/back1.png" />
	</a>
</div>

<!--<div class="tabs wx_tabs">
    <a href="/system/op/edit.html?mid=15&tpl=sj_plan"{eq name="Request.param.order_type" value="1"}class="active"{/eq}>维修申请</a>
    <a href="/system/logic.query/record.html?mid=15&ser_type=0"{eq name="Request.param.ser_type" value="2"}class="active"{/eq}>维修列表</a>
</div>
<article style="bottom: 0;" class="mescroll" id="mescroll">
    <div class="weui_cells weui_cells_access" id="content-slide"></div>
</article>-->
{/block}
{block name="script"}
	<script id="test" type="text/html">  
		<!--模板-->
    	{{ each rows}} 
    	<div class="weui_cell list_weui_cells xz_list" href="javascript:;">
            <div class="weui_cell_bd weui_cell_primary item_hidden">
                <div class="wuliao-title">
                    <label>车牌号：{{ $value.car_sn }}</label>
                    <span>-{{ $value.driver }}</span>
                </div>
                <div class="detail clearfix">
                    <span class="date">开始时间：<label>{{ $value.ser_start_time }}</label></span>
                </div>
                <div class="detail clearfix list_hidden">
                	<span style="color: #000;">保养原因：{{ $value.break_project }}</span>
                </div>
                <div class="org">
					<span class="date">预计取车时间：<label>{{ $value.break_fine }}</label></span>
                    <label class="red" onclick="more()">查看更多</label>
                </div>
            </div>
       </div>
	    {{ /each }}
	</script>  
	<script type="text/javascript">
		$(function () {
		    var order_type="{$Request.param.order_type}";
            initPage('content-slide',' /system/logic.query/record.html?mid=15',{order_type:order_type},'test');
        });
        
        (function (doc, win) {
		    var docEl = doc.documentElement,
		    resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
		    recalc = function () {
		      var clientWidth = docEl.clientWidth;
		      if (!clientWidth) return;
		      docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
		    };
		
			if (!doc.addEventListener) return;
				  win.addEventListener(resizeEvt, recalc, false);
				  doc.addEventListener('DOMContentLoaded', recalc, false);
		})(document, window);
				
				
		var tabsSwiper = new Swiper('.swiper-container',{
			speed:500,
			onSlideChangeStart: function(){
				$(".tabs .active").removeClass('active');
				$(".tabs a").eq(tabsSwiper.activeIndex).addClass('active');
			}
		});
		
		$(".tabs a").on('touchstart mousedown',function(e){
			e.preventDefault()
			$(".tabs .active").removeClass('active');
			$(this).addClass('active');
			tabsSwiper.swipeTo($(this).index());
		});
		
		$(".tabs a").click(function(e){
			e.preventDefault();
		});
	</script>
	
{/block}
